<template>
  <div class="found-detail" >
   <van-nav-bar
  :title="title"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"/>
    <img :src="img" class="img"/>
    <div id="introduce" >
      <p>
        在该话题下的投稿的原创视频，且是带有‘小母牛’等关键字，即可有机会获得5000元奖金哦
      </p>
    </div>
    <!-- 内容 -->
      <pictures :tab_id="1" v-if="lei!=1"></pictures>
      <articles v-if="lei==1"></articles>     
  </div>
</template>

<script>
import fooTer from "@/components/fooTer";
import axios from 'axios'
import articles from '@/components/artilcles'
import pictures from '@/components/pictures'
export default {
  components: {
    fooTer,
    articles,
    pictures,
  },
  data() {
    return {
      fenleis:[],
      title:'',
      img:'',
      lei:''
    };
  },
 created() {
      axios.get("http://localhost:3000/found_detail?id=" + this.$route.params.id)
        .then(res => {
          this.fenleis=res.data.data
          this.title=this.fenleis[0].found_name
          this.img=this.fenleis[0].found_img
          this.lei=this.fenleis.length
        })
        .catch(error => {
          console.log(error);
        })
  },
  methods: {
    onClickLeft() {
       history.back();
    },
    onClickRight() {
      Toast("按钮");
    },
  },
};
</script>

<style lang="less" scoped>
/deep/ .van-image__img {
  padding: 15px;
  border-radius: 50%;
  width: 48%;
  height: 48%;
}
.img{
    width: 414px;
    height: 300px;
}
#introduce {
    margin: 10px;
  p {
    color: rgb(209, 203, 203);
  }
}
</style>